#ifndef FHE_GRAPHICS_WINDOW_H
#define FHE_GRAPHICS_WINDOW_H

#include <fhegraphics/GLWidget.h>
#include <fhegraphics/RenderContext.h>
#include <fhe/prims/IUpdatable.h>
#include <fhe/math/Vec.h>
#include <fhe/core/Node.h>

class QMainWindow;
class QTimer;

namespace fhe
{
  using namespace core;
  namespace graphics
  {
    class Window : public Node, public IUpdatable, public GLWidget::RenderTarget
    {
    public:
      Window();
      virtual ~Window();
      
      std::string title;
      Vec2i size;
      Color clearColor;
      double fps;
      
      void update( double t, double dt );
      void render();
      
    private:
      QMainWindow* window_;
      GLWidget* glWidget_;
      QTimer* timer_;
      RenderContext renderContext_;
    };
  }
}

#endif
